<template>
  <div>
    <div class="box-main">
      <div class="box-lift">
        <overview-init v-if="sprintOverviewShow==='1'" :sprintId="sprintId" :projectId="projectId"></overview-init>
        <board v-if="sprintOverviewShow==='2'" :sprintId="sprintId" :projectId="projectId"></board>
        <sprint-work-list v-if="sprintOverviewShow==='3'" :sprintId="sprintId" :projectId="projectId"></sprint-work-list>
      </div>
      <div class="box-right">
        <el-button @click="goBack" style="margin-bottom: 20px">返回</el-button>
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          @select="(val) => sprintOverviewShow = val.toString()">
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <span slot="title">概览</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i>
            <span slot="title">看板</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-document"></i>
            <span slot="title">工作项</span>
          </el-menu-item>
        </el-menu>
      </div>
    </div>
  </div>
</template>

<script>
import OverviewInit from "@/views/project/init/sprint/sprintOverview/overviewInit/index.vue";
import Board from "@/views/project/init/sprint/sprintOverview/board/index.vue";
import SprintWorkList from "@/views/project/init/sprint/sprintOverview/sprintWorkList/index.vue";

export default {
  name: "SprintOverview",
  components: {SprintWorkList, Board, OverviewInit},
  data() {
    return {
      sprintOverviewShow:'1'
    }
  },
  props: {
    sprintId: {
      type: Number,
    },
    projectId: {
      type: Number,
    }
  },
  created() {

  },
  mounted() {
  },
  methods: {
    goBack() {
      this.$emit('getSprintId', null)
    },
  }
}
</script>
<style src="@/assets/styles/overview.scss"  lang="scss" scoped></style>
<style scoped lang="scss">
</style>
